package com.lxmMq.common.tools;

import com.alibaba.otter.canal.protocol.CanalEntry;
import org.jetbrains.annotations.NotNull;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CanalUtils {
    public static @NotNull Map<String, String> getMap(@NotNull List<CanalEntry.Column> rowDataList) {
        Map<String, String> map = new HashMap<>();
        rowDataList.forEach(column -> map.put(column.getName().toString(),
                column.getValue().toString()));
        return map;
    }
}
